<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Format</span><span>
</span><span id="line-2"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Format.html#Productish"><span class="hs-identifier">Productish</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-3"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#Summish"><span class="hs-identifier">Summish</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-4"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#parseReader"><span class="hs-identifier">parseReader</span></a></span><span>
</span><span id="line-5"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier">Format</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#formatShow"><span class="hs-identifier">formatShow</span></a></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#formatParseM"><span class="hs-identifier">formatParseM</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#isoMap"><span class="hs-identifier">isoMap</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#mapMFormat"><span class="hs-identifier">mapMFormat</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#filterFormat"><span class="hs-identifier">filterFormat</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#clipFormat"><span class="hs-identifier">clipFormat</span></a></span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#enumMap"><span class="hs-identifier">enumMap</span></a></span><span>
</span><span id="line-13"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#literalFormat"><span class="hs-identifier">literalFormat</span></a></span><span>
</span><span id="line-14"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#specialCaseShowFormat"><span class="hs-identifier">specialCaseShowFormat</span></a></span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#specialCaseFormat"><span class="hs-identifier">specialCaseFormat</span></a></span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#optionalFormat"><span class="hs-identifier">optionalFormat</span></a></span><span>
</span><span id="line-17"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#casesFormat"><span class="hs-identifier">casesFormat</span></a></span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#optionalSignFormat"><span class="hs-identifier">optionalSignFormat</span></a></span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#mandatorySignFormat"><span class="hs-identifier">mandatorySignFormat</span></a></span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier">SignOption</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#integerFormat"><span class="hs-identifier">integerFormat</span></a></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#decimalFormat"><span class="hs-identifier">decimalFormat</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier">fail</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">#if MIN_VERSION_base(4,8,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Void.html#"><span class="hs-identifier">Data.Void</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span class="hs-cpp">


#if MIN_VERSION_base(4,8,0)
</span><span class="hs-cpp">#else
</span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">Void</span><span>
</span><span id="line-39"></span><span class="hs-identifier">absurd</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">Void</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-40"></span><span class="hs-identifier">absurd</span><span> </span><span class="hs-identifier">v</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">seq</span><span> </span><span class="hs-identifier">v</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">error</span><span> </span><span class="hs-string">&quot;absurd&quot;</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-43"></span><span class="hs-keyword">class</span><span> </span><span id="IsoVariant"><span class="annot"><a href="Data.Format.html#IsoVariant"><span class="hs-identifier hs-var">IsoVariant</span></a></span></span><span> </span><span id="local-6989586621679067281"><span class="annot"><a href="#local-6989586621679067281"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-44"></span><span>    </span><span id="local-6989586621679067279"><span id="local-6989586621679067280"><span id="isoMap"><span class="annot"><a href="Data.Format.html#isoMap"><span class="hs-identifier hs-type">isoMap</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067280"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067279"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067279"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067280"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067281"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067280"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067281"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067279"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span id="local-6989586621679067284"><span id="local-6989586621679067286"><span class="annot"><a href="Data.Format.html#enumMap"><span class="hs-identifier hs-type">enumMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#IsoVariant"><span class="hs-identifier hs-type">IsoVariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067286"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067284"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067286"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067286"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067284"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-47"></span><span id="enumMap"><span class="annot"><span class="annottext">enumMap :: forall (f :: * -&gt; *) a. (IsoVariant f, Enum a) =&gt; f Int -&gt; f a
</span><a href="Data.Format.html#enumMap"><span class="hs-identifier hs-var hs-var">enumMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; a) -&gt; (a -&gt; Int) -&gt; f Int -&gt; f a
forall (f :: * -&gt; *) a b.
IsoVariant f =&gt;
(a -&gt; b) -&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.Format.html#isoMap"><span class="hs-identifier hs-var">isoMap</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a
forall a. Enum a =&gt; Int -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">3</span><span> </span><span class="annot"><a href="Data.Format.html#%3C%2A%2A%3E"><span class="hs-operator hs-type">&lt;**&gt;</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#%2A%2A%3E"><span class="hs-operator hs-type">**&gt;</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Format.html#%3C%2A%2A"><span class="hs-operator hs-type">&lt;**</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">class</span><span> </span><span class="annot"><a href="Data.Format.html#IsoVariant"><span class="hs-identifier hs-type">IsoVariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="Productish"><span class="annot"><a href="Data.Format.html#Productish"><span class="hs-identifier hs-var">Productish</span></a></span></span><span> </span><span id="local-6989586621679067277"><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>    </span><span id="pUnit"><span class="annot"><a href="Data.Format.html#pUnit"><span class="hs-identifier hs-type">pUnit</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>    </span><span id="local-6989586621679067269"><span id="local-6989586621679067270"><span id="%3C%2A%2A%3E"><span class="annot"><a href="Data.Format.html#%3C%2A%2A%3E"><span class="hs-operator hs-type">(&lt;**&gt;)</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067270"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067269"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067270"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679067269"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-53"></span><span>    </span><span id="local-6989586621679067275"><span id="%2A%2A%3E"><span class="annot"><a href="Data.Format.html#%2A%2A%3E"><span class="hs-operator hs-type">(**&gt;)</span></a></span></span><span> </span><span class="hs-glyph">::</span><span>  </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067275"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067275"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-54"></span><span>    </span><span id="local-6989586621679067130"><span id="local-6989586621679067126"><span class="annot"><span class="annottext">f ()
</span><a href="#local-6989586621679067126"><span class="hs-identifier hs-var">fu</span></a></span></span><span> </span><span class="annot"><a href="Data.Format.html#%2A%2A%3E"><span class="hs-operator hs-var hs-var">**&gt;</span></a></span><span> </span><span id="local-6989586621679067125"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679067125"><span class="hs-identifier hs-var">fa</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(((), a) -&gt; a) -&gt; (a -&gt; ((), a)) -&gt; f ((), a) -&gt; f a
forall (f :: * -&gt; *) a b.
IsoVariant f =&gt;
(a -&gt; b) -&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.Format.html#isoMap"><span class="hs-identifier hs-var">isoMap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span id="local-6989586621679067124"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067124"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067124"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067123"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067123"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067123"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(f ((), a) -&gt; f a) -&gt; f ((), a) -&gt; f a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">f ()
</span><a href="#local-6989586621679067126"><span class="hs-identifier hs-var">fu</span></a></span><span> </span><span class="annot"><span class="annottext">f () -&gt; f a -&gt; f ((), a)
forall (f :: * -&gt; *) a b. Productish f =&gt; f a -&gt; f b -&gt; f (a, b)
</span><a href="Data.Format.html#%3C%2A%2A%3E"><span class="hs-operator hs-var">&lt;**&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679067125"><span class="hs-identifier hs-var">fa</span></a></span></span><span>
</span><span id="line-55"></span><span>    </span><span id="local-6989586621679067268"><span id="%3C%2A%2A"><span class="annot"><a href="Data.Format.html#%3C%2A%2A"><span class="hs-operator hs-type">(&lt;**)</span></a></span></span><span> </span><span class="hs-glyph">::</span><span>  </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067268"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067277"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067268"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-56"></span><span>    </span><span id="local-6989586621679067122"><span id="local-6989586621679067118"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679067118"><span class="hs-identifier hs-var">fa</span></a></span></span><span> </span><span class="annot"><a href="Data.Format.html#%3C%2A%2A"><span class="hs-operator hs-var hs-var">&lt;**</span></a></span><span> </span><span id="local-6989586621679067117"><span class="annot"><span class="annottext">f ()
</span><a href="#local-6989586621679067117"><span class="hs-identifier hs-var">fu</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, ()) -&gt; a) -&gt; (a -&gt; (a, ())) -&gt; f (a, ()) -&gt; f a
forall (f :: * -&gt; *) a b.
IsoVariant f =&gt;
(a -&gt; b) -&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.Format.html#isoMap"><span class="hs-identifier hs-var">isoMap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679067116"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067116"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067116"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067115"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067115"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067115"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(f (a, ()) -&gt; f a) -&gt; f (a, ()) -&gt; f a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679067118"><span class="hs-identifier hs-var">fa</span></a></span><span> </span><span class="annot"><span class="annottext">f a -&gt; f () -&gt; f (a, ())
forall (f :: * -&gt; *) a b. Productish f =&gt; f a -&gt; f b -&gt; f (a, b)
</span><a href="Data.Format.html#%3C%2A%2A%3E"><span class="hs-operator hs-var">&lt;**&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">f ()
</span><a href="#local-6989586621679067117"><span class="hs-identifier hs-var">fu</span></a></span></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">2</span><span> </span><span class="annot"><a href="Data.Format.html#%3C%2B%2B%3E"><span class="hs-operator hs-type">&lt;++&gt;</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">class</span><span> </span><span class="annot"><a href="Data.Format.html#IsoVariant"><span class="hs-identifier hs-type">IsoVariant</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="Summish"><span class="annot"><a href="Data.Format.html#Summish"><span class="hs-identifier hs-var">Summish</span></a></span></span><span> </span><span id="local-6989586621679067266"><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>    </span><span id="pVoid"><span class="annot"><a href="Data.Format.html#pVoid"><span class="hs-identifier hs-type">pVoid</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="../../base/src/Data.Void.html#Void"><span class="hs-identifier hs-type">Void</span></a></span><span>
</span><span id="line-61"></span><span>    </span><span id="local-6989586621679067214"><span id="local-6989586621679067215"><span id="%3C%2B%2B%3E"><span class="annot"><a href="Data.Format.html#%3C%2B%2B%3E"><span class="hs-operator hs-type">(&lt;++&gt;)</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067215"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067214"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067266"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067215"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067214"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span id="local-6989586621679067263"><span id="local-6989586621679067264"><span class="annot"><a href="Data.Format.html#parseReader"><span class="hs-identifier hs-type">parseReader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span>    </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067264"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">Monad</span><span> </span><span class="hs-identifier">m</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067263"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067264"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067263"><span class="hs-identifier hs-type">t</span></a></span></span></span><span>
</span><span id="line-71"></span><span id="parseReader"><span class="annot"><span class="annottext">parseReader :: forall (m :: * -&gt; *) t. MonadFail m =&gt; ReadP t -&gt; String -&gt; m t
</span><a href="Data.Format.html#parseReader"><span class="hs-identifier hs-var hs-var">parseReader</span></a></span></span><span> </span><span id="local-6989586621679067100"><span class="annot"><span class="annottext">ReadP t
</span><a href="#local-6989586621679067100"><span class="hs-identifier hs-var">readp</span></a></span></span><span> </span><span id="local-6989586621679067099"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067099"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067098"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679067098"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067098"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP t -&gt; ReadS t
forall a. ReadP a -&gt; ReadS a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP t
</span><a href="#local-6989586621679067100"><span class="hs-identifier hs-var">readp</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067099"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-72"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621679067096"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067096"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">t -&gt; m t
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067096"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; m t
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; m t) -&gt; String -&gt; m t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;no parse of &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067099"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-74"></span><span>    </span><span class="annot"><span class="annottext">[t]
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; m t
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; m t) -&gt; String -&gt; m t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;multiple parses of &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067099"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | A text format for a type</span><span>
</span><span id="line-77"></span><span class="hs-keyword">data</span><span> </span><span id="Format"><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-var">Format</span></a></span></span><span> </span><span id="local-6989586621679067251"><span class="annot"><a href="#local-6989586621679067251"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MkFormat"><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span></span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-special">{</span><span> </span><span id="formatShowM"><span class="annot"><span class="annottext">forall t. Format t -&gt; t -&gt; Maybe String
</span><a href="Data.Format.html#formatShowM"><span class="hs-identifier hs-var hs-var">formatShowM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679067251"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-79"></span><span>        </span><span class="hs-comment">-- ^ Show a value in the format, if representable</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="formatReadP"><span class="annot"><span class="annottext">forall t. Format t -&gt; ReadP t
</span><a href="Data.Format.html#formatReadP"><span class="hs-identifier hs-var hs-var">formatReadP</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067251"><span class="hs-identifier hs-type">t</span></a></span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-comment">-- ^ Read a value in the format</span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">-- | Show a value in the format, or error if unrepresentable</span><span>
</span><span id="line-85"></span><span id="local-6989586621679067247"><span class="annot"><a href="Data.Format.html#formatShow"><span class="hs-identifier hs-type">formatShow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067247"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067247"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-86"></span><span id="formatShow"><span class="annot"><span class="annottext">formatShow :: forall t. Format t -&gt; t -&gt; String
</span><a href="Data.Format.html#formatShow"><span class="hs-identifier hs-var hs-var">formatShow</span></a></span></span><span> </span><span id="local-6989586621679067089"><span class="annot"><span class="annottext">Format t
</span><a href="#local-6989586621679067089"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679067088"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067088"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Format t -&gt; t -&gt; Maybe String
forall t. Format t -&gt; t -&gt; Maybe String
</span><a href="Data.Format.html#formatShowM"><span class="hs-identifier hs-var hs-var">formatShowM</span></a></span><span> </span><span class="annot"><span class="annottext">Format t
</span><a href="#local-6989586621679067089"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679067088"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-87"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679067087"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067087"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067087"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-88"></span><span>    </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;formatShow: bad value&quot;</span></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | Parse a value in the format</span><span>
</span><span id="line-91"></span><span id="local-6989586621679067241"><span id="local-6989586621679067242"><span class="annot"><a href="Data.Format.html#formatParseM"><span class="hs-identifier hs-type">formatParseM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span>    </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">MonadFail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067242"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">Monad</span><span> </span><span class="hs-identifier">m</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067241"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067242"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067241"><span class="hs-identifier hs-type">t</span></a></span></span></span><span>
</span><span id="line-98"></span><span id="formatParseM"><span class="annot"><span class="annottext">formatParseM :: forall (m :: * -&gt; *) t. MonadFail m =&gt; Format t -&gt; String -&gt; m t
</span><a href="Data.Format.html#formatParseM"><span class="hs-identifier hs-var hs-var">formatParseM</span></a></span></span><span> </span><span id="local-6989586621679067083"><span class="annot"><span class="annottext">Format t
</span><a href="#local-6989586621679067083"><span class="hs-identifier hs-var">format</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP t -&gt; String -&gt; m t
forall (m :: * -&gt; *) t. MonadFail m =&gt; ReadP t -&gt; String -&gt; m t
</span><a href="Data.Format.html#parseReader"><span class="hs-identifier hs-var">parseReader</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP t -&gt; String -&gt; m t) -&gt; ReadP t -&gt; String -&gt; m t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Format t -&gt; ReadP t
forall t. Format t -&gt; ReadP t
</span><a href="Data.Format.html#formatReadP"><span class="hs-identifier hs-var hs-var">formatReadP</span></a></span><span> </span><span class="annot"><span class="annottext">Format t
</span><a href="#local-6989586621679067083"><span class="hs-identifier hs-var">format</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Format.html#IsoVariant"><span class="hs-identifier hs-type">IsoVariant</span></a></span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-101"></span><span>    </span><span id="local-6989586621679067077"><span class="annot"><span class="annottext">isoMap :: forall a b. (a -&gt; b) -&gt; (b -&gt; a) -&gt; Format a -&gt; Format b
</span><a href="#local-6989586621679067077"><span class="hs-identifier hs-var hs-var hs-var hs-var">isoMap</span></a></span></span><span> </span><span id="local-6989586621679067076"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679067076"><span class="hs-identifier hs-var">ab</span></a></span></span><span> </span><span id="local-6989586621679067075"><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679067075"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067074"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067074"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679067073"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067073"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; Maybe String) -&gt; ReadP b -&gt; Format b
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067072"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067072"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067074"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; a -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; a
</span><a href="#local-6989586621679067075"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067072"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; ReadP a -&gt; ReadP b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679067076"><span class="hs-identifier hs-var">ab</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067073"><span class="hs-identifier hs-var">ra</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span id="local-6989586621679067232"><span id="local-6989586621679067233"><span class="annot"><a href="Data.Format.html#mapMFormat"><span class="hs-identifier hs-type">mapMFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067233"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067232"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067232"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067233"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067233"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067232"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-104"></span><span id="mapMFormat"><span class="annot"><span class="annottext">mapMFormat :: forall a b.
(a -&gt; Maybe b) -&gt; (b -&gt; Maybe a) -&gt; Format a -&gt; Format b
</span><a href="Data.Format.html#mapMFormat"><span class="hs-identifier hs-var hs-var">mapMFormat</span></a></span></span><span> </span><span id="local-6989586621679067067"><span class="annot"><span class="annottext">a -&gt; Maybe b
</span><a href="#local-6989586621679067067"><span class="hs-identifier hs-var">amb</span></a></span></span><span> </span><span id="local-6989586621679067066"><span class="annot"><span class="annottext">b -&gt; Maybe a
</span><a href="#local-6989586621679067066"><span class="hs-identifier hs-var">bma</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067065"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067065"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679067064"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067064"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(b -&gt; Maybe String) -&gt; ReadP b -&gt; Format b
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067063"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067063"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; Maybe a
</span><a href="#local-6989586621679067066"><span class="hs-identifier hs-var">bma</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067063"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; (a -&gt; Maybe String) -&gt; Maybe String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067065"><span class="hs-identifier hs-var">sa</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(ReadP b -&gt; Format b) -&gt; ReadP b -&gt; Format b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-105"></span><span>    </span><span id="local-6989586621679067062"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067062"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067064"><span class="hs-identifier hs-var">ra</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe b
</span><a href="#local-6989586621679067067"><span class="hs-identifier hs-var">amb</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067062"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-107"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679067061"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067061"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; ReadP b
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067061"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><span class="annottext">Maybe b
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP b
forall a. ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span id="local-6989586621679067226"><span class="annot"><a href="Data.Format.html#filterFormat"><span class="hs-identifier hs-type">filterFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067226"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067226"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067226"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-111"></span><span id="filterFormat"><span class="annot"><span class="annottext">filterFormat :: forall a. (a -&gt; Bool) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#filterFormat"><span class="hs-identifier hs-var hs-var">filterFormat</span></a></span></span><span> </span><span id="local-6989586621679067059"><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679067059"><span class="hs-identifier hs-var">test</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; (a -&gt; Maybe a) -&gt; Format a -&gt; Format a
forall a b.
(a -&gt; Maybe b) -&gt; (b -&gt; Maybe a) -&gt; Format a -&gt; Format b
</span><a href="Data.Format.html#mapMFormat"><span class="hs-identifier hs-var">mapMFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067058"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067058"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679067059"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067058"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067058"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067057"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067057"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
</span><a href="#local-6989586621679067059"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067057"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067057"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- | Limits are inclusive</span><span>
</span><span id="line-114"></span><span id="local-6989586621679067223"><span class="annot"><a href="Data.Format.html#clipFormat"><span class="hs-identifier hs-type">clipFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679067223"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067223"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679067223"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067223"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067223"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-115"></span><span id="clipFormat"><span class="annot"><span class="annottext">clipFormat :: forall a. Ord a =&gt; (a, a) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#clipFormat"><span class="hs-identifier hs-var hs-var">clipFormat</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679067053"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067053"><span class="hs-identifier hs-var">lo</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679067052"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067052"><span class="hs-identifier hs-var">hi</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; Format a -&gt; Format a
forall a. (a -&gt; Bool) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#filterFormat"><span class="hs-identifier hs-var">filterFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679067051"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067051"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067051"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067053"><span class="hs-identifier hs-var">lo</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067051"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067052"><span class="hs-identifier hs-var">hi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Format.html#Productish"><span class="hs-identifier hs-type">Productish</span></a></span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621679067039"><span class="annot"><span class="annottext">pUnit :: Format ()
</span><a href="#local-6989586621679067039"><span class="hs-identifier hs-var hs-var hs-var hs-var">pUnit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MkFormat :: forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">formatShowM :: () -&gt; Maybe String
</span><a href="Data.Format.html#formatShowM"><span class="hs-identifier hs-var">formatShowM</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">formatReadP :: ReadP ()
</span><a href="Data.Format.html#formatReadP"><span class="hs-identifier hs-var">formatReadP</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621679067038"><span class="annot"><span class="annottext">&lt;**&gt; :: forall a b. Format a -&gt; Format b -&gt; Format (a, b)
</span><a href="#local-6989586621679067038"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;**&gt;)</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067037"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067037"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679067036"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067036"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067035"><span class="annot"><span class="annottext">b -&gt; Maybe String
</span><a href="#local-6989586621679067035"><span class="hs-identifier hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679067034"><span class="annot"><span class="annottext">ReadP b
</span><a href="#local-6989586621679067034"><span class="hs-identifier hs-var">rb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-120"></span><span>        </span><span id="local-6989586621679067030"><span class="annot"><span class="annottext">sab :: (a, b) -&gt; Maybe String
</span><a href="#local-6989586621679067030"><span class="hs-identifier hs-var hs-var">sab</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679067029"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067029"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679067028"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067028"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-121"></span><span>            </span><span id="local-6989586621679067027"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067027"><span class="hs-identifier hs-var">astr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067037"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067029"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-122"></span><span>            </span><span id="local-6989586621679067026"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067026"><span class="hs-identifier hs-var">bstr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">b -&gt; Maybe String
</span><a href="#local-6989586621679067035"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067028"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-123"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067027"><span class="hs-identifier hs-var">astr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067026"><span class="hs-identifier hs-var">bstr</span></a></span><span>
</span><span id="line-124"></span><span>        </span><span id="local-6989586621679067022"><span class="annot"><span class="annottext">rab :: ReadP (a, b)
</span><a href="#local-6989586621679067022"><span class="hs-identifier hs-var hs-var">rab</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-125"></span><span>            </span><span id="local-6989586621679067021"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067021"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067036"><span class="hs-identifier hs-var">ra</span></a></span><span>
</span><span id="line-126"></span><span>            </span><span id="local-6989586621679067020"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067020"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP b
</span><a href="#local-6989586621679067034"><span class="hs-identifier hs-var">rb</span></a></span><span>
</span><span id="line-127"></span><span>            </span><span class="annot"><span class="annottext">(a, b) -&gt; ReadP (a, b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067021"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679067020"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">((a, b) -&gt; Maybe String) -&gt; ReadP (a, b) -&gt; Format (a, b)
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">(a, b) -&gt; Maybe String
</span><a href="#local-6989586621679067030"><span class="hs-identifier hs-var">sab</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP (a, b)
</span><a href="#local-6989586621679067022"><span class="hs-identifier hs-var">rab</span></a></span><span>
</span><span id="line-129"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067019"><span class="annot"><span class="annottext">() -&gt; Maybe String
</span><a href="#local-6989586621679067019"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679067018"><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679067018"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679067017"><span class="annot"><span class="annottext">**&gt; :: forall a. Format () -&gt; Format a -&gt; Format a
</span><a href="#local-6989586621679067017"><span class="hs-operator hs-var hs-var hs-var hs-var">**&gt;</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067016"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067016"><span class="hs-identifier hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679067015"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067015"><span class="hs-identifier hs-var">rb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-130"></span><span>        </span><span id="local-6989586621679067011"><span class="annot"><span class="annottext">s :: a -&gt; Maybe String
</span><a href="#local-6989586621679067011"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679067010"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067010"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-131"></span><span>            </span><span id="local-6989586621679067009"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067009"><span class="hs-identifier hs-var">astr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">() -&gt; Maybe String
</span><a href="#local-6989586621679067019"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>            </span><span id="local-6989586621679067008"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067008"><span class="hs-identifier hs-var">bstr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067016"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679067010"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-133"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067009"><span class="hs-identifier hs-var">astr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679067008"><span class="hs-identifier hs-var">bstr</span></a></span><span>
</span><span id="line-134"></span><span>        </span><span id="local-6989586621679067006"><span class="annot"><span class="annottext">r :: ReadP a
</span><a href="#local-6989586621679067006"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-135"></span><span>            </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679067018"><span class="hs-identifier hs-var">ra</span></a></span><span>
</span><span id="line-136"></span><span>            </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067015"><span class="hs-identifier hs-var">rb</span></a></span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; ReadP a -&gt; Format a
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067011"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067006"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067005"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067005"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679067004"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067004"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679067003"><span class="annot"><span class="annottext">&lt;** :: forall a. Format a -&gt; Format () -&gt; Format a
</span><a href="#local-6989586621679067003"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;**</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679067002"><span class="annot"><span class="annottext">() -&gt; Maybe String
</span><a href="#local-6989586621679067002"><span class="hs-identifier hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679067001"><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679067001"><span class="hs-identifier hs-var">rb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-139"></span><span>        </span><span id="local-6989586621679066997"><span class="annot"><span class="annottext">s :: a -&gt; Maybe String
</span><a href="#local-6989586621679066997"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679066996"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066996"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-140"></span><span>            </span><span id="local-6989586621679066995"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066995"><span class="hs-identifier hs-var">astr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679067005"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066996"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-141"></span><span>            </span><span id="local-6989586621679066994"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066994"><span class="hs-identifier hs-var">bstr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">() -&gt; Maybe String
</span><a href="#local-6989586621679067002"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066995"><span class="hs-identifier hs-var">astr</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066994"><span class="hs-identifier hs-var">bstr</span></a></span><span>
</span><span id="line-143"></span><span>        </span><span id="local-6989586621679066990"><span class="annot"><span class="annottext">r :: ReadP a
</span><a href="#local-6989586621679066990"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>            </span><span id="local-6989586621679066989"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066989"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679067004"><span class="hs-identifier hs-var">ra</span></a></span><span>
</span><span id="line-145"></span><span>            </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679067001"><span class="hs-identifier hs-var">rb</span></a></span><span>
</span><span id="line-146"></span><span>            </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066989"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; ReadP a -&gt; Format a
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066997"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066990"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Data.Format.html#Summish"><span class="hs-identifier hs-type">Summish</span></a></span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-150"></span><span>    </span><span id="local-6989586621679066982"><span class="annot"><span class="annottext">pVoid :: Format Void
</span><a href="#local-6989586621679066982"><span class="hs-identifier hs-var hs-var hs-var hs-var">pVoid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Void -&gt; Maybe String) -&gt; ReadP Void -&gt; Format Void
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Void -&gt; Maybe String
forall a. Void -&gt; a
</span><a href="../../base/src/Data.Void.html#absurd"><span class="hs-identifier hs-var">absurd</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Void
forall a. ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-151"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679066980"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066980"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679066979"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066979"><span class="hs-identifier hs-var">ra</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679066978"><span class="annot"><span class="annottext">&lt;++&gt; :: forall a b. Format a -&gt; Format b -&gt; Format (Either a b)
</span><a href="#local-6989586621679066978"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;++&gt;</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679066977"><span class="annot"><span class="annottext">b -&gt; Maybe String
</span><a href="#local-6989586621679066977"><span class="hs-identifier hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679066976"><span class="annot"><span class="annottext">ReadP b
</span><a href="#local-6989586621679066976"><span class="hs-identifier hs-var">rb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-152"></span><span>        </span><span id="local-6989586621679066975"><span class="annot"><span class="annottext">sab :: Either a b -&gt; Maybe String
</span><a href="#local-6989586621679066975"><span class="hs-identifier hs-var hs-var">sab</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679066974"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066974"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066980"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066974"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-153"></span><span>        </span><span class="annot"><a href="#local-6989586621679066975"><span class="hs-identifier hs-var">sab</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679066973"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679066973"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; Maybe String
</span><a href="#local-6989586621679066977"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679066973"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-154"></span><span>        </span><span id="local-6989586621679066970"><span class="annot"><span class="annottext">rab :: ReadP (Either a b)
</span><a href="#local-6989586621679066970"><span class="hs-identifier hs-var hs-var">rab</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Either a b) -&gt; ReadP a -&gt; ReadP (Either a b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Either a b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066979"><span class="hs-identifier hs-var">ra</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ReadP (Either a b) -&gt; ReadP (Either a b) -&gt; ReadP (Either a b)
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; Either a b) -&gt; ReadP b -&gt; ReadP (Either a b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Either a b
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP b
</span><a href="#local-6989586621679066976"><span class="hs-identifier hs-var">rb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(Either a b -&gt; Maybe String)
-&gt; ReadP (Either a b) -&gt; Format (Either a b)
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Either a b -&gt; Maybe String
</span><a href="#local-6989586621679066975"><span class="hs-identifier hs-var">sab</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP (Either a b)
</span><a href="#local-6989586621679066970"><span class="hs-identifier hs-var">rab</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="Data.Format.html#literalFormat"><span class="hs-identifier hs-type">literalFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span id="literalFormat"><span class="annot"><span class="annottext">literalFormat :: String -&gt; Format ()
</span><a href="Data.Format.html#literalFormat"><span class="hs-identifier hs-var hs-var">literalFormat</span></a></span></span><span> </span><span id="local-6989586621679066968"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066968"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MkFormat :: forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">formatShowM :: () -&gt; Maybe String
</span><a href="Data.Format.html#formatShowM"><span class="hs-identifier hs-var">formatShowM</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066968"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">formatReadP :: ReadP ()
</span><a href="Data.Format.html#formatReadP"><span class="hs-identifier hs-var">formatReadP</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066968"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP () -&gt; ReadP ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span id="local-6989586621679067205"><span class="annot"><a href="Data.Format.html#specialCaseShowFormat"><span class="hs-identifier hs-type">specialCaseShowFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679067205"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067205"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067205"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067205"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-161"></span><span id="specialCaseShowFormat"><span class="annot"><span class="annottext">specialCaseShowFormat :: forall a. Eq a =&gt; (a, String) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#specialCaseShowFormat"><span class="hs-identifier hs-var hs-var">specialCaseShowFormat</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679066965"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066965"><span class="hs-identifier hs-var">val</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679066964"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066964"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679066963"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066963"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679066962"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066962"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-162"></span><span>    </span><span id="local-6989586621679066960"><span class="annot"><span class="annottext">s' :: a -&gt; Maybe String
</span><a href="#local-6989586621679066960"><span class="hs-identifier hs-var hs-var">s'</span></a></span></span><span> </span><span id="local-6989586621679066959"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066959"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066959"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066965"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066964"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-163"></span><span>    </span><span class="annot"><a href="#local-6989586621679066960"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span id="local-6989586621679066958"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066958"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066963"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066958"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; ReadP a -&gt; Format a
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066960"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066962"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span id="local-6989586621679066957"><span class="annot"><a href="Data.Format.html#specialCaseFormat"><span class="hs-identifier hs-type">specialCaseFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679066957"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679066957"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066957"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066957"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-167"></span><span id="specialCaseFormat"><span class="annot"><span class="annottext">specialCaseFormat :: forall a. Eq a =&gt; (a, String) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#specialCaseFormat"><span class="hs-identifier hs-var hs-var">specialCaseFormat</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679066955"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066955"><span class="hs-identifier hs-var">val</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679066954"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066954"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-type">MkFormat</span></a></span><span> </span><span id="local-6989586621679066953"><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066953"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679066952"><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066952"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-168"></span><span>    </span><span id="local-6989586621679066950"><span class="annot"><span class="annottext">s' :: a -&gt; Maybe String
</span><a href="#local-6989586621679066950"><span class="hs-identifier hs-var hs-var">s'</span></a></span></span><span> </span><span id="local-6989586621679066949"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066949"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066949"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066955"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066954"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-169"></span><span>    </span><span class="annot"><a href="#local-6989586621679066950"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span id="local-6989586621679066948"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066948"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066953"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066948"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-170"></span><span>    </span><span id="local-6989586621679066945"><span class="annot"><span class="annottext">r' :: ReadP a
</span><a href="#local-6989586621679066945"><span class="hs-identifier hs-var hs-var">r'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066954"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP a -&gt; ReadP a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066955"><span class="hs-identifier hs-var">val</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadP a -&gt; ReadP a
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066952"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-171"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; ReadP a -&gt; Format a
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066950"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP a
</span><a href="#local-6989586621679066945"><span class="hs-identifier hs-var">r'</span></a></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span id="local-6989586621679067201"><span class="annot"><a href="Data.Format.html#optionalFormat"><span class="hs-identifier hs-type">optionalFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679067201"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067201"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067201"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067201"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-174"></span><span id="optionalFormat"><span class="annot"><span class="annottext">optionalFormat :: forall a. Eq a =&gt; a -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#optionalFormat"><span class="hs-identifier hs-var hs-var">optionalFormat</span></a></span></span><span> </span><span id="local-6989586621679066942"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066942"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, String) -&gt; Format a -&gt; Format a
forall a. Eq a =&gt; (a, String) -&gt; Format a -&gt; Format a
</span><a href="Data.Format.html#specialCaseFormat"><span class="hs-identifier hs-var">specialCaseFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066942"><span class="hs-identifier hs-var">val</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span id="local-6989586621679067199"><span class="annot"><a href="Data.Format.html#casesFormat"><span class="hs-identifier hs-type">casesFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679067199"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067199"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067199"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-177"></span><span id="casesFormat"><span class="annot"><span class="annottext">casesFormat :: forall a. Eq a =&gt; [(a, String)] -&gt; Format a
</span><a href="Data.Format.html#casesFormat"><span class="hs-identifier hs-var hs-var">casesFormat</span></a></span></span><span> </span><span id="local-6989586621679066940"><span class="annot"><span class="annottext">[(a, String)]
</span><a href="#local-6989586621679066940"><span class="hs-identifier hs-var">pairs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-178"></span><span>    </span><span id="local-6989586621679066938"><span class="annot"><span class="annottext">s :: a -&gt; Maybe String
</span><a href="#local-6989586621679066938"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679066937"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066937"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [(a, String)] -&gt; Maybe String
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066937"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)]
</span><a href="#local-6989586621679066940"><span class="hs-identifier hs-var">pairs</span></a></span><span>
</span><span id="line-179"></span><span>    </span><span id="local-6989586621679066933"><span class="annot"><span class="annottext">r :: [(a, String)] -&gt; ReadP a
</span><a href="#local-6989586621679066933"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP a
forall a. ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-180"></span><span>    </span><span class="annot"><a href="#local-6989586621679066933"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679066932"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066932"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679066931"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066931"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679066930"><span class="annot"><span class="annottext">[(a, String)]
</span><a href="#local-6989586621679066930"><span class="hs-identifier hs-var">pp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066931"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP a -&gt; ReadP a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679066932"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ReadP a -&gt; ReadP a -&gt; ReadP a
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)] -&gt; ReadP a
</span><a href="#local-6989586621679066933"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)]
</span><a href="#local-6989586621679066930"><span class="hs-identifier hs-var">pp</span></a></span><span>
</span><span id="line-181"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe String) -&gt; ReadP a -&gt; Format a
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe String
</span><a href="#local-6989586621679066938"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP a -&gt; Format a) -&gt; ReadP a -&gt; Format a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)] -&gt; ReadP a
forall {a}. [(a, String)] -&gt; ReadP a
</span><a href="#local-6989586621679066933"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, String)]
</span><a href="#local-6989586621679066940"><span class="hs-identifier hs-var">pairs</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span id="local-6989586621679067194"><span class="annot"><a href="Data.Format.html#optionalSignFormat"><span class="hs-identifier hs-type">optionalSignFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679067194"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067194"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067194"><span class="hs-identifier hs-type">t</span></a></span></span><span>
</span><span id="line-184"></span><span id="optionalSignFormat"><span class="annot"><span class="annottext">optionalSignFormat :: forall t. (Eq t, Num t) =&gt; Format t
</span><a href="Data.Format.html#optionalSignFormat"><span class="hs-identifier hs-var hs-var">optionalSignFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(t, String)] -&gt; Format t
forall a. Eq a =&gt; [(a, String)] -&gt; Format a
</span><a href="Data.Format.html#casesFormat"><span class="hs-identifier hs-var">casesFormat</span></a></span><span>
</span><span id="line-185"></span><span>    </span><span class="hs-special">[</span><span>
</span><span id="line-186"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-187"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;+&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-188"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-189"></span><span>        </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span id="local-6989586621679066920"><span class="annot"><a href="Data.Format.html#mandatorySignFormat"><span class="hs-identifier hs-type">mandatorySignFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679066920"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066920"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066920"><span class="hs-identifier hs-type">t</span></a></span></span><span>
</span><span id="line-193"></span><span id="mandatorySignFormat"><span class="annot"><span class="annottext">mandatorySignFormat :: forall t. (Eq t, Num t) =&gt; Format t
</span><a href="Data.Format.html#mandatorySignFormat"><span class="hs-identifier hs-var hs-var">mandatorySignFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(t, String)] -&gt; Format t
forall a. Eq a =&gt; [(a, String)] -&gt; Format a
</span><a href="Data.Format.html#casesFormat"><span class="hs-identifier hs-var">casesFormat</span></a></span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-special">[</span><span>
</span><span id="line-195"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;+&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-196"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;+&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-197"></span><span>        </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="hs-keyword">data</span><span> </span><span id="SignOption"><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-var">SignOption</span></a></span></span><span>
</span><span id="line-201"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="NoSign"><span class="annot"><a href="Data.Format.html#NoSign"><span class="hs-identifier hs-var">NoSign</span></a></span></span><span>
</span><span id="line-202"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="NegSign"><span class="annot"><a href="Data.Format.html#NegSign"><span class="hs-identifier hs-var">NegSign</span></a></span></span><span>
</span><span id="line-203"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="PosNegSign"><span class="annot"><a href="Data.Format.html#PosNegSign"><span class="hs-identifier hs-var">PosNegSign</span></a></span></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span id="local-6989586621679067191"><span class="annot"><a href="Data.Format.html#readSign"><span class="hs-identifier hs-type">readSign</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067191"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-type">SignOption</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679067191"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067191"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-206"></span><span id="readSign"><span class="annot"><span class="annottext">readSign :: forall t. Num t =&gt; SignOption -&gt; ReadP (t -&gt; t)
</span><a href="Data.Format.html#readSign"><span class="hs-identifier hs-var hs-var">readSign</span></a></span></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="Data.Format.html#NoSign"><span class="hs-identifier hs-var">NoSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-207"></span><span class="annot"><a href="Data.Format.html#readSign"><span class="hs-identifier hs-var">readSign</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="Data.Format.html#NegSign"><span class="hs-identifier hs-var">NegSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall a. a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#option"><span class="hs-identifier hs-var">option</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t))
-&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span>
</span><span id="line-208"></span><span class="annot"><a href="Data.Format.html#readSign"><span class="hs-identifier hs-var">readSign</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="Data.Format.html#PosNegSign"><span class="hs-identifier hs-var">PosNegSign</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP (t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; ReadP (t -&gt; t)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span id="local-6989586621679067185"><span class="annot"><a href="Data.Format.html#readNumber"><span class="hs-identifier hs-type">readNumber</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067185"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067185"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-type">SignOption</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067185"><span class="hs-identifier hs-type">t</span></a></span></span><span>
</span><span id="line-211"></span><span id="readNumber"><span class="annot"><span class="annottext">readNumber :: forall t.
(Num t, Read t) =&gt;
SignOption -&gt; Maybe Int -&gt; Bool -&gt; ReadP t
</span><a href="Data.Format.html#readNumber"><span class="hs-identifier hs-var hs-var">readNumber</span></a></span></span><span> </span><span id="local-6989586621679066882"><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066882"><span class="hs-identifier hs-var">signOpt</span></a></span></span><span> </span><span id="local-6989586621679066881"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066881"><span class="hs-identifier hs-var">mdigitcount</span></a></span></span><span> </span><span id="local-6989586621679066880"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679066880"><span class="hs-identifier hs-var">allowDecimal</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-212"></span><span>    </span><span id="local-6989586621679066879"><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679066879"><span class="hs-identifier hs-var">sign</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SignOption -&gt; ReadP (t -&gt; t)
forall t. Num t =&gt; SignOption -&gt; ReadP (t -&gt; t)
</span><a href="Data.Format.html#readSign"><span class="hs-identifier hs-var">readSign</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066882"><span class="hs-identifier hs-var">signOpt</span></a></span><span>
</span><span id="line-213"></span><span>    </span><span id="local-6989586621679066878"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066878"><span class="hs-identifier hs-var">digits</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-214"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066881"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-215"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679066877"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679066877"><span class="hs-identifier hs-var">digitcount</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Char -&gt; ReadP String
forall a. Int -&gt; ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679066877"><span class="hs-identifier hs-var">digitcount</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP Char -&gt; ReadP String) -&gt; ReadP Char -&gt; ReadP String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span>
</span><span id="line-216"></span><span>            </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP String
forall a. ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP Char -&gt; ReadP String) -&gt; ReadP Char -&gt; ReadP String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span>
</span><span id="line-217"></span><span>    </span><span id="local-6989586621679066872"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066872"><span class="hs-identifier hs-var">moredigits</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679066880"><span class="hs-identifier hs-var">allowDecimal</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-219"></span><span>            </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-220"></span><span>            </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-221"></span><span>                </span><span class="annot"><span class="annottext">String -&gt; ReadP String -&gt; ReadP String
forall a. a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#option"><span class="hs-identifier hs-var">option</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">(ReadP String -&gt; ReadP String) -&gt; ReadP String -&gt; ReadP String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-222"></span><span>                    </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">','</span></span><span>
</span><span id="line-223"></span><span>                    </span><span id="local-6989586621679066871"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066871"><span class="hs-identifier hs-var">dd</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP String
forall a. ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>                    </span><span class="annot"><span class="annottext">String -&gt; ReadP String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ReadP String) -&gt; String -&gt; ReadP String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066871"><span class="hs-identifier hs-var">dd</span></a></span><span>
</span><span id="line-225"></span><span>    </span><span class="annot"><span class="annottext">t -&gt; ReadP t
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(t -&gt; ReadP t) -&gt; t -&gt; ReadP t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679066879"><span class="hs-identifier hs-var">sign</span></a></span><span> </span><span class="annot"><span class="annottext">(t -&gt; t) -&gt; t -&gt; t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; t
forall a. Read a =&gt; String -&gt; a
</span><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; t) -&gt; String -&gt; t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066878"><span class="hs-identifier hs-var">digits</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066872"><span class="hs-identifier hs-var">moredigits</span></a></span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="annot"><a href="Data.Format.html#zeroPad"><span class="hs-identifier hs-type">zeroPad</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-228"></span><span id="zeroPad"><span class="annot"><span class="annottext">zeroPad :: Maybe Int -&gt; String -&gt; String
</span><a href="Data.Format.html#zeroPad"><span class="hs-identifier hs-var hs-var">zeroPad</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621679066868"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066868"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066868"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-229"></span><span class="annot"><a href="Data.Format.html#zeroPad"><span class="hs-identifier hs-var">zeroPad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679066867"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679066867"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679066866"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066866"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679066867"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066866"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066866"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="annot"><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-type">trimTrailing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-232"></span><span id="trimTrailing"><span class="annot"><span class="annottext">trimTrailing :: String -&gt; String
</span><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var hs-var">trimTrailing</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-233"></span><span class="annot"><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var">trimTrailing</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-234"></span><span class="annot"><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var">trimTrailing</span></a></span><span> </span><span id="local-6989586621679066862"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066862"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#last"><span class="hs-identifier hs-var">last</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066862"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var">trimTrailing</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#init"><span class="hs-identifier hs-var">init</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066862"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-235"></span><span class="annot"><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var">trimTrailing</span></a></span><span> </span><span id="local-6989586621679066859"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066859"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066859"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span id="local-6989586621679067175"><span class="annot"><a href="Data.Format.html#showNumber"><span class="hs-identifier hs-type">showNumber</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067175"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-type">SignOption</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679067175"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-238"></span><span id="showNumber"><span class="annot"><span class="annottext">showNumber :: forall t. Show t =&gt; SignOption -&gt; Maybe Int -&gt; t -&gt; Maybe String
</span><a href="Data.Format.html#showNumber"><span class="hs-identifier hs-var hs-var">showNumber</span></a></span></span><span> </span><span id="local-6989586621679066855"><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066855"><span class="hs-identifier hs-var">signOpt</span></a></span></span><span> </span><span id="local-6989586621679066854"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066854"><span class="hs-identifier hs-var">mdigitcount</span></a></span></span><span> </span><span id="local-6989586621679066853"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679066853"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-239"></span><span>    </span><span id="local-6989586621679066852"><span class="annot"><span class="annottext">showIt :: String -&gt; String
</span><a href="#local-6989586621679066852"><span class="hs-identifier hs-var hs-var">showIt</span></a></span></span><span> </span><span id="local-6989586621679066851"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066851"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-240"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679066849"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066849"><span class="hs-identifier hs-var">intPart</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679066848"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066848"><span class="hs-identifier hs-var">decPart</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">(==)</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066851"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Int -&gt; String -&gt; String
</span><a href="Data.Format.html#zeroPad"><span class="hs-identifier hs-var">zeroPad</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066854"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066849"><span class="hs-identifier hs-var">intPart</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Data.Format.html#trimTrailing"><span class="hs-identifier hs-var">trimTrailing</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066848"><span class="hs-identifier hs-var">decPart</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">t -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679066853"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-243"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679066846"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066846"><span class="hs-identifier hs-var">str</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-244"></span><span>               </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066855"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-245"></span><span>                   </span><span class="annot"><span class="annottext">SignOption
</span><a href="Data.Format.html#NoSign"><span class="hs-identifier hs-var">NoSign</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-246"></span><span>                   </span><span class="annot"><span class="annottext">SignOption
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679066852"><span class="hs-identifier hs-var">showIt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066846"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-247"></span><span>           </span><span id="local-6989586621679066845"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066845"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-248"></span><span>               </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; String -&gt; Maybe String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066855"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-249"></span><span>                   </span><span class="annot"><span class="annottext">SignOption
</span><a href="Data.Format.html#PosNegSign"><span class="hs-identifier hs-var">PosNegSign</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679066852"><span class="hs-identifier hs-var">showIt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066845"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-250"></span><span>                   </span><span class="annot"><span class="annottext">SignOption
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679066852"><span class="hs-identifier hs-var">showIt</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679066845"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span id="local-6989586621679067172"><span class="annot"><a href="Data.Format.html#integerFormat"><span class="hs-identifier hs-type">integerFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067172"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067172"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067172"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-type">SignOption</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679067172"><span class="hs-identifier hs-type">t</span></a></span></span><span>
</span><span id="line-253"></span><span id="integerFormat"><span class="annot"><span class="annottext">integerFormat :: forall t.
(Show t, Read t, Num t) =&gt;
SignOption -&gt; Maybe Int -&gt; Format t
</span><a href="Data.Format.html#integerFormat"><span class="hs-identifier hs-var hs-var">integerFormat</span></a></span></span><span> </span><span id="local-6989586621679066838"><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066838"><span class="hs-identifier hs-var">signOpt</span></a></span></span><span> </span><span id="local-6989586621679066837"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066837"><span class="hs-identifier hs-var">mdigitcount</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SignOption -&gt; Maybe Int -&gt; t -&gt; Maybe String
forall t. Show t =&gt; SignOption -&gt; Maybe Int -&gt; t -&gt; Maybe String
</span><a href="Data.Format.html#showNumber"><span class="hs-identifier hs-var">showNumber</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066838"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066837"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SignOption -&gt; Maybe Int -&gt; Bool -&gt; ReadP t
forall t.
(Num t, Read t) =&gt;
SignOption -&gt; Maybe Int -&gt; Bool -&gt; ReadP t
</span><a href="Data.Format.html#readNumber"><span class="hs-identifier hs-var">readNumber</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066838"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066837"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span id="local-6989586621679066836"><span class="annot"><a href="Data.Format.html#decimalFormat"><span class="hs-identifier hs-type">decimalFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066836"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066836"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066836"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#SignOption"><span class="hs-identifier hs-type">SignOption</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679066836"><span class="hs-identifier hs-type">t</span></a></span></span><span>
</span><span id="line-256"></span><span id="decimalFormat"><span class="annot"><span class="annottext">decimalFormat :: forall t.
(Show t, Read t, Num t) =&gt;
SignOption -&gt; Maybe Int -&gt; Format t
</span><a href="Data.Format.html#decimalFormat"><span class="hs-identifier hs-var hs-var">decimalFormat</span></a></span></span><span> </span><span id="local-6989586621679066829"><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066829"><span class="hs-identifier hs-var">signOpt</span></a></span></span><span> </span><span id="local-6989586621679066828"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066828"><span class="hs-identifier hs-var">mdigitcount</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
forall t. (t -&gt; Maybe String) -&gt; ReadP t -&gt; Format t
</span><a href="Data.Format.html#MkFormat"><span class="hs-identifier hs-var">MkFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SignOption -&gt; Maybe Int -&gt; t -&gt; Maybe String
forall t. Show t =&gt; SignOption -&gt; Maybe Int -&gt; t -&gt; Maybe String
</span><a href="Data.Format.html#showNumber"><span class="hs-identifier hs-var">showNumber</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066829"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066828"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SignOption -&gt; Maybe Int -&gt; Bool -&gt; ReadP t
forall t.
(Num t, Read t) =&gt;
SignOption -&gt; Maybe Int -&gt; Bool -&gt; ReadP t
</span><a href="Data.Format.html#readNumber"><span class="hs-identifier hs-var">readNumber</span></a></span><span> </span><span class="annot"><span class="annottext">SignOption
</span><a href="#local-6989586621679066829"><span class="hs-identifier hs-var">signOpt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679066828"><span class="hs-identifier hs-var">mdigitcount</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>
</span><span id="line-257"></span></pre></body></html>